param ([string]$name)

$projects = Get-ChildItem -Directory | ?{$_.Name -notlike "fonts"} | Select-Object -ExpandProperty Name

if ($projects -contains $name) {
    typst compile --font-path "fonts" "$name/src/main.typ" "$name/out.pdf"
} else {
    Write-Host "Project $name not found. Existing projects:`n$($projects -join "`n")"
}